Run2 HH4b AN

Official version: https://cms.cern.ch/iCMS/jsp/db_notes/noteInfo.jsp?cmsnoteid=CMS%20AN-2024/089 Twiki: https://twiki.cern.ch/twiki/bin/view/CMSPublic/Run2HH4b

Figure Updates from L2

  • fig5 plots for the other signal samples.
    • Probably need a way of making 2-8 in new code
  • fig 9 split by year
  • 1D mass projections of SR and SB
  • Add chuyuan's studies in an appendix
  • [ ] Fig. 51 (hemisphere summary variables): for different jet bins
  • [ ] Fig 53: NN vs other hemisphere in the event
  • Add regions to fig 69 and 70
  • Add SvB for ZZ and ZH in the SR
  • [ ] Add plots on ISR / FSR study
  • [ ] Roc plot p(HH) vs p(signal|HH)

To do

  • L3 comments v2
  • [ ] Need new background model
  • Whats wrong with mixed data fits ?
    • Repeate Closure with old SvB
  • What is up with PS FSR ?

Towards v4

  • [ ] Update nominal background for k-folding
  • cutflow hists
  • Try new SvB classifier for kλ
  • [ ] Redo plots with new JCM ?
  • [ ] Re do FvT fits with new code
  • [ ] Try to Correct bias from ZZ region (?)
  • Add to AN
    • Add κλ scan

Scripts to make plots

python plots/makePlotsMixedVsDataVs3b.py --comb plots/ANv3/histAll_noFvT.coffea plots/ANv3/histMixedData.coffea -m plots/metadata/plotMixedVsDataVs3b.yml --out plotsANv3/mixedVsDataVs3b

python analysis/makePlotsAN.py hists/ANv3/histAll.coffea --out hists/ANv3/plots

python -i analysis/makePlotsAN_noFvT.py hists/ANv3/histAll_noFvT.coffea --out hists/ANv3/plots_noFvT -m analysis/metadata/plotsAllNoFvT.yml

python analysis/makePlotsMixedVsDataVs3b.py --comb hists/ANv3/histAll_noFvT.coffea hists/ANv3/histMixedData.coffea -m analysis/metadata/plotMixedVsDataVs3b.yml --out hists/ANv3/mixedVsDataVs3b

python analysis/makePlotsAN_noFvT_muQCD.py hists/ANv3/histAll_noFvT.coffea --out hists/ANv3/plots_noFvT_muQCD -m analysis/metadata/plotsAllNoFvT_muQCD.yml

Unblinded Presentations

Daily Logs

15 October 2025 Wednesday

source coffea4bees/scripts/makeplotsForPaper.sh Acc plots: scp $LPC:/uscms/home/jda102/nobackup/HH4b/Run3/coffea4bees/python/output/analysis_testAll_job/hist_HH.coffea output/analysis_test_job python coffea4bees/plots/makeAccxEff.py output/analysis_test_job/signal_HH4b_nano_fixed.coffea output/analysis_test_job/hist_HH.coffea --output testAccNew Relative effs look good… But not the totall… Need to debug…

07 October 2025 Tuesday

  • Crisis… Could not find yamls… restored from backup…
  • Figured out AE put them in archive… all good
  • Changes for axisopts
  • Adding option to change CMS label
  • pushing.

02 July 2025 Wednesday

  • Copy postfit plots From:

https://plotsalgomez.webtest.cern.ch/HH4b/reana/20250605_0dc846dc_unblinded_wdataUL17B/datacards/

  • Extract the yaml - python3 extract_hist_data.py -i plotsForPaper/SvB_MA_postfitplots_prefit_138.C -t plotsForPaper/plot_template_with_signal.yaml -c plotsForPaper/hist_config.yaml -o plotsForPaper/SvB_MA_postfitplots_prefit_138.yaml
    • python3 extract_hist_data.py -i plotsForPaper/SvB_MA_postfitplots_fit_b_138.C -t plotsForPaper/plot_template_no_signal.yaml -c plotsForPaper/hist_config.yaml -o plotsForPaper/SvB_MA_postfitplots_fit_b_138.yaml
    • python3 extract_hist_data.py -i plotsForPaper/SvB_MA_postfitplots_fit_s_138.C -t plotsForPaper/plot_template_with_signal_stacked.yaml -c plotsForPaper/hist_config.yaml -o plotsForPaper/SvB_MA_postfitplots_fit_s_138.yaml
  • Added to slides
  • Committed
  • Added to AN repo (not added in latex yet)

13 June 2025 Friday

  • working variance plots
    • python plots/variance_plot_from_yaml.py --input_yaml_files plotsForPaper/0_variance_multijet_ensemble_basis0.yaml -o plotsForPaper/

12 June 2025 Thursday

  • Getting the bias plots running… python3 extract_hist_data.py -i plotsForPaper/1_bias_basis-1.C -t plotsForPaper/plot_template_bias.yaml -c plotsForPaper/hist_config_bias.yaml -o plotsForPaper/1_bias_basis-1.yaml --NMAX_BINS 47 python3 extract_hist_data.py -i plotsForPaper/0_variance_multijet_ensemble_basis0.C -t plotsForPaper/plot_template_variance.yaml -c plotsForPaper/hist_config_variance0.yaml -o plotsForPaper/0_variance_multijet_ensemble_basis0.yaml
  • pushed
  • Added step histograms in ratios
  • Added legend in ration frams

11 June 2025 Wednesday

  • Coding with cursor
  • Use template fill in
  • Making conversion file with Cursor: python3 extract_hist_data.py -i plotsForPaper/SvB_MA_postfitplots_fit_b.C -t plotsForPaper/plot_template_no_signal.yaml -c plotsForPaper/hist_config.yaml -o plotsForPaper/SvB_MA_postfitplots_fit_b.yaml python3 extract_hist_data.py -i plotsForPaper/SvB_MA_postfitplots_prefit.C -t plotsForPaper/plot_template_with_signal.yaml -c plotsForPaper/hist_config.yaml -o plotsForPaper/SvB_MA_postfitplots_prefit.yaml python3 extract_hist_data.py -i plotsForPaper/SvB_MA_postfitplots_fit_s.C -t plotsForPaper/plot_template_with_signal_stacked.yaml -c plotsForPaper/hist_config.yaml -o plotsForPaper/SvB_MA_postfitplots_fit_s.yaml
  • Added custom ordering of the legend
  • Updated the mixed data plots.
  • Added all the plots to the AN.. pushed a new AN

10 June 2025 Tuesday

09 June 2025 Monday

  • Plots list for HH paper
    • [X] Acc x Eff plots Relative
    • [X] Acc x Eff absolute
    • [X] SvBbHH SB before RW
    • [X] SvBHH SB after RW
    • [X] Mixed vs data vs Mulitjet SB HH
    • [X] Mixed vs data vs Mulitjet SR HH
    • [X] Vairance study
    • [X] Closure study
    • [X] SvB S+B fit
    • [X] SvB pre-fit
    • [X] SvB B fit
  • Plots from https://plotsalgomez.webtest.cern.ch/HH4b/reana/20250605_0dc846dc_unblinded/
  • Updating mixed data summary plots in AN python plots/makePlotsMixedVsDataVs3b.py --comb plots/ANUnblinded/histAll_noFvT.coffea plots/ANUnblinded/histMixedData.coffea -m plots/metadata/plotMixedVsDataVs3b.yml --out plotsANUnblinded/mixedVsDataVs3b
  • Script to make yamls
    • py plots/makePlotsPaper.py plots/ANUnblinded/histAll.coffea --out plotsANUnblinded/
  • Script to make pdfs
    • py plots/plot_from_yaml.py --input_yaml_files plotsForPaper/RunII/passPreSel/fourTag/SB/SvB_MA_ps_hh_logy.yaml plotsForPaper/RunII/passPreSel/fourTag/SB/SvB_MA_noFvT_ps_hh_logy.yaml -o plotsForPaper

06 June 2025 Friday

  • Trying to update the mixed plots with data in the SR
  • Need to make the noFvT histograms (See above for instructions)
  • Running on cmslpc330 python runner.py -d data TTToHadronic TTToSemiLeptonic TTTo2L2Nu ZZ4b ZH4b GluGluToHHTo4B_cHHH1 -c analysis/metadata/HH4b_noFvT.yml -p analysis/processors/processor_HH4b.py -y UL17 UL18 UL16_preVFP UL16_postVFP -o histAll_noFvT.coffea -op hists/ --condor
  • Condor fails.. trying locally…Got it to run.. but realized I dont need it after all We save SvBnoFvT in the nominal histograms
  • Updated the plots/makePlotsMixedVsDataVs3b.py to use that python plots/makePlotsMixedVsDataVs3b.py --comb plots/ANUnblinded/histAll_noFvT.coffea plots/ANUnblinded/histMixedData.coffea -m plots/metadata/plotMixedVsDataVs3b.yml --out plotsANUnblinded/mixedVsDataVs3b
  • Plots look good.

26 March 2025 Wednesday

  • Added ps vs phh plot
  • pushed
  • Updated comments
  • Wait on AE for TTbar CR before send

17 March 2025 Monday

  • New Acceptance plots
  • Remake m4j plots after removing fix for Nones .. in matchBjets∝
  • python runner.py -o signal_HH4b_nano_fixed.coffea -d GluGluToHHTo4B_cHHH1 -p analysis/processors/processor_HH4b.py -y UL18 UL17 UL16_preVFP UL16_postVFP -op output/analysis_test_job -m metadata/datasets_HH4b.yml -c analysis/metadata/HH4b_nano.yml
  • python plots/makeAccxEff.py output/analysis_test_job/signal_HH4b_nano_fixed.coffea hist_HH.coffea --output testAccNew
  • Only half (46%) the events have four matching genJets
    • ΔR to 0.4 => 68%
    • ΔR to 10 => 99%
  • Fixes the weird mHH distribution that I say earlier !!!!

15 March 2025 Saturday

  • [>>] ROC plots for various signal points
  • Solid first draft

6 March 2025 Thursday

  • need hemiplots and new data
  • Finished L2 comments… AE will push to website

3 March 2025 Monday

  • Check with AE re:template uncertainties
  • AE sees limits get worse with flat binning…. debugging… <font color=red> Fixed </font>
  • Just hemisphere plots lefts to do

28 February 2025 Friday

  • truth HH plots before and after genWeight cleaning
  • Now have 2018 AccXEff plot looking good!
  • Run nano on other years
    • python runner.py -o signal_HH4b_nano.coffea -d GluGluToHHTo4B_cHHH1 -p analysis/processors/processor_HH4b.py -y UL18 UL17 UL16_preVFP UL16_postVFP -op output/analysis_test_job -m metadata/datasets_HH4b.yml -c analysis/metadata/HH4b_nano.yml
  • UL17 crashes.. fix for puID large eta jets… now runs
  • running on all HH picos (to get trig weights)
    • python runner.py -o hist_HH.coffea -d GluGluToHHTo4B_cHHH1 -p analysis/processors/processor_HH4b.py -y UL18 UL17 UL16_preVFP UL16_postVFP -op output/analysis_testAll_job -m metadata/datasets_HH4b_v1p1.yml -c analysis/metadata/HH4b_noFvT.yml
  • Adding all years, plot labels and legends.

26 February 2025 Wednesday

  • [>>] AccXEff plots with Add Cutflow Histograms
  • Debug wrt cutflow
  • Need to remove outliers
  • Cleaning up cutflow interface
  • Lots of progress…
  • Need two files at once, one with no skimming / one with the trigger weights
  • histAll doesnt have cutflowhists properly merged
  • single signal files from reAna dont have trigger weights applied.
  • Added option to read in two files
  • Added SF to correct relative norm between the files.

25 February 2025 Tuesday

  • Updating the coments in markdown … much better than twiki!
  • [>>] Make efficiency plots with Add Cutflow Histograms
    • python runner.py -o signal_HH4b_nano.coffea -d GluGluToHHTo4B_cHHH1 -p analysis/processors/processor_HH4b.py -y UL18 -op output/analysis_test_job -m metadata/datasets_HH4b.yml -c analysis/metadata/HH4b_nano.yml
  • Need to add four tag to the cut flow hists
  • Update Weights
  • Starting script to plot eff
    • python plots/makeAccxEff.py signal_HH4b_nano.coffea
  • Weights off … problem was with trigger weights.
  • [>>] Debug wrt cutflow

24 February 2025 Monday

  • Working L2 comments
  • Added the ZZ and ZH SR plots (Took them from HIG-22-011)
  • Added Chuyuans updated classifier studies to appendix

21 February 2025 Friday

  • Make comparison of 1d projections of masses, added to Twiki
  • Need to update makePlotsMixedVsDataVs3b.py
  • Updated figures 69 and 70 with region names.

19 February 2025 Wednesday

  • Some L2 Questions

[BROKEN LINK: 70989FA1-6823-4C54-8292-6C1ACE84162A]

  • Update list of figures needed … see above

11 February 2025 Tuesday

  • Start L2 Questions

13 November 2024 Wednesday

[>>] HIstograms to cutflow

  • colors [>>] ggHbb 3b w/o and w JCM

14 November 2024 Thursday

Looking into ggHbb

  • python runner.py -p analysis/processors/processor_HH4b.py -y UL18 -d ttHbb ggHbb -c analysis/metadata/HH4b_rareBkgs.yml -o test_ttHbb_ggHbb.coffea -op hists/
  • too slow… changed top reco to fast and now only running ggHbb
  • python runner.py -p analysis/processors/processor_HH4b.py -y UL18 -d ggHbb -c analysis/metadata/HH4b_rareBkgs.yml -o test_ggHbb.coffea -op hists/
  • print cut flow with python analysis/printCutFlow.py -i hists/test_ggHbb.coffea -p ggHbb -e UL18
  • HACKING the trigger bit requirement
  • Debugging the noFvT weights.. found errror.. Fixing…
  • Make new ggHbb plots…sent to Marko [>>] Update AN and twiki

15 November 2024 Friday

  • Update AN and twiki with ggHbb
  • script to make plots from histAll.coffea
  • python analysis/makePlotsAN.py hists/ANv3/histAll.coffea --out hists/ANv3/plots [>>] Bkg stat uncertianty in ratio band ? [>>] Add nPseudoTagJets plot [>>] Setup noFvT pipeline [>>] Why is canJet Phi 0-pi ?

16 November 2024 Saturday

  • Making noFvT plots on 340
  • Make noFvT hists
    • python runner.py -d data TTToHadronic TTToSemiLeptonic TTTo2L2Nu ZZ4b ZH4b GluGluToHHTo4B_cHHH1 -c analysis/metadata/HH4b_noFvT.yml -p analysis/processors/processor_HH4b.py -y UL17 UL18 UL16_preVFP UL16_postVFP -o histAll_noFvT.coffea -op hists/
  • Making noFvT Plots
    • python -i analysis/makePlotsAN_noFvT.py hists/ANv3/histAll_noFvT.coffea --out hists/ANv3/plots_noFvT -m analysis/metadata/plotsAllNoFvT.yml
  • Added noFVT plots to AN
  • Updating JCM fits
    • =python analysis/makeweights.py -o testJCMCoffea -c passPreSel -r SB -i hists/histAllnoFvT.coffea =
    • python analysis/make_weights.py -o testJCM_Coffea_fix_e -c passPreSel -r SB -i hists/histAll_noFvT.coffea -fix_e
    • python analysis/make_weights.py -o testJCM_Coffea_fix_d -c passPreSel -r SB -i hists/histAll_noFvT.coffea -fix_d
    • Adding fit data to JCM plots
  • Updated JCM plots in AN
  • Adding nPSjet hists
  • Updating plots pre JCM: (got muQCD from the JCM fit)
  • python analysis/makePlotsAN_noFvT_muQCD.py hists/ANv3/histAll_noFvT.coffea --out hists/ANv3/plots_noFvT_muQCD -m analysis/metadata/plotsAllNoFvT_muQCD.yml

20 November 2024 Wednesday

  • Working the mixed data summary plots
  • Running on cmslpc336
  • source  .ci-workflows/analysis-mixed-all.sh
  • Found bug with multi-jet weights for mixed background …
  • Fixing CI… after merge with johnda/master
  • Fixed CI … now mixed cutflow fails !!
  • Now to mixed data summary plots
  • = python -i analysis/iPlot.py –comb hists/ANv3/histAllnoFvT.coffea hists/ANv3/histMixedData.coffea -m analysis/metadata/plotMixedVsDataVs3b.yml=
  • python analysis/makePlotsMixedVsDataVs3b.py --comb hists/ANv3/histAll_noFvT.coffea hists/ANv3/histMixedData.coffea -m analysis/metadata/plotMixedVsDataVs3b.yml --out hists/ANv3/mixedVsDataVs3b [>>] Function for processing stack dict in base_class/plots [>>] Debug data_3b_for_mixed cutflow
  • Added debugging output to outfile… Rerunning CI…

21 November 2024 Thursday

  • Got mixed ave and v0 plots running.
  • Stats ratio error wrong!
  • updated error in the ratio plots
  • Added error band for the bkg uncertainty
  • Need to blind the NoFvT plots !!!… running….DONE
  • Function for processing stack dict in base_class/plots
  • remade noFvT plots now blinded
  • updated the mixed data summary plots

22 November 2024 Friday

23 November 2024 Saturday

  • Updated runTwoStageClosure to use new colors

9 December 2024 Monday

  • Chat AE: he will push today
  • Working Appendix with CL results
  • Finished the comments
  • [XX] Send
  • AE found problem with the fits… will wait to send

13 December 2024 Friday

  • Updating the responses.
  • New v3 versions
  • Send email to L3s

Archive

Cut a v3:

  • Fix binning
  • ggHbb 3b w/o and w JCM
  • Finalize L3 comments
  • Add to AN
    • (AE) Add Boosted / Resolved discussion
    • (AE) prefit plots + impact/pulls with asimov data
    • (AE) plots per year ( to appendix T)
    • (AE) refit ZZ/ZH sensitivity (should actually improve with ensembeling )
    • Blinded prefit plots (JA)
  • Add to AN
    • Update plots with new code
      • fig 32 (Problem with ttbar Fraction)
      • 33 (From JCM Fits)
      • 34 (Need to add nPseudoTagJets)
      • 36 - 40 are (No FvT plots)
      • 42 - 49 (FvT Plots)
      • 72 Mixed data summary plots
      • 91-93 (From Combine)
      • 98
      • 99 - 101 (From Combine)

Follow-ups

Links:

202411141049